import cv2
import numpy as np

img = cv2.imread("apricot blossom.jpg",cv2.IMREAD_GRAYSCALE)

v1 = cv2.Canny(img,120,250) #120,250分别为minVal,maxVal
v2 = cv2.Canny(img,50,100)


def cv_show(name,img):
    cv2.imshow(name,img) #第一个参数表示窗口名称
    cv2.waitKey(0) #等待时间，毫秒，0表示任意键终止
    cv2.destroyAllWindows()


res = np.hstack((v1,v2))
cv_show('res',res)